<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr = [1,2,3,4,5];
        console.log(arr);
        arr.reverse();
        console.log(arr);

        //helloworld字符串：反转显示：
        //split join reverse
        var str = "helloworld";
        var myarr = str.split("");
        myarr.reverse();
        var myarr1 = myarr.join("");
        console.log(myarr1);//dlrowolleh

        



    </script>
</body>
</html>